
import {createRouter, createWebHashHistory, RouteRecordRaw} from 'vue-router';

const routers:RouteRecordRaw[] = [
    {
        path: '/', 
        redirect: '/login'
    },
    {
        path: '/login',
        component: () => import('@/pages/login/login.vue')
    },
    {
        path: '/home',
        component: () => import('@/pages/home/home.vue'),
        children:[
            {
                path: 'main',
                component: () => import('@/pages/home/main/main.vue')
            },
            {
                path: 'video',
                component: () => import('@/pages/home/video/video.vue'),
                children: [
                    {
                        path: 'edit',
                        component: () => import('@/pages/home/video/edit/edit.vue')
                    }
                ]
            },
            {
                path: 'broad',
                component: () => import('@/pages/home/broadcast/broadcast.vue'),
                children: [
                    {
                        path: 'edit',
                        component: () => import('@/pages/home/broadcast/edit/edit.vue')
                    }
                ]
            }
        ]
    }
];


const router = createRouter({
    routes: routers,
    history: createWebHashHistory()
})

export default router;